Skip to content

chore(webapp): remove unused dependencies and add a knip check#4239

Closed
ericallam wants to merge 1 commit into
mainfrom
chore/remove-unused-webapp-deps
Closed

chore(webapp): remove unused dependencies and add a knip check#4239
ericallam wants to merge 1 commit into
mainfrom
chore/remove-unused-webapp-deps

Conversation

@ericallam

Copy link
Copy Markdown
Member

Summary

Removes 25 unused production dependencies from the webapp (plus 4 orphaned @types/* packages and two dead files whose only importers were those packages), and adds a knip:deps script so unused dependencies can be found systematically from now on.

Details

The removed packages are leftovers that nothing in the webapp imports. They were found with knip, added here as a dev dependency with a knip:deps script (knip --production --dependencies) and a knip.json config. knip's production analysis is workspace-aware and catches dependencies reachable only through otherwise-dead code, which a plain grep can't: both removed deps' only importer files, SimpleSelect.tsx and ulid.server.ts, were themselves unused.

non.geist is ignored in the config: it's a font imported for its side effects via tailwind.css, invisible to knip. socket.io-client also reports as unused for the webapp but is handled in a separate PR.

Removes 25 unused production dependencies from the webapp (plus 4 orphaned
@types packages and two dead files whose only importers were those packages,
SimpleSelect.tsx and ulid.server.ts).

Adds knip as a dev dependency with a knip:deps script and a knip.json config so
unused dependencies can be found the same way from now on. knip catches deps
reachable only through otherwise-dead code, which a plain grep cannot. non.geist
is ignored: it is a font imported for its side effects via tailwind.css.
@changeset-bot

changeset-bot Bot commented Jul 13, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 1215492

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 513f856a-7a54-4232-b557-b7c533f248bc

📥 Commits

Reviewing files that changed from the base of the PR and between c601739 and 1215492.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (5)
  • apps/webapp/app/components/primitives/SimpleSelect.tsx
  • apps/webapp/app/services/ulid.server.ts
  • apps/webapp/package.json
  • knip.json
  • package.json
💤 Files with no reviewable changes (3)
  • apps/webapp/app/services/ulid.server.ts
  • apps/webapp/app/components/primitives/SimpleSelect.tsx
  • apps/webapp/package.json
📜 Recent review details
⏰ Context from checks skipped due to timeout. (41)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (12, 12)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (2, 12)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (7, 12)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (6, 12)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (1, 12)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (9, 12)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (8, 12)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (11, 12)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (10, 12)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (3, 12)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (5, 12)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (4, 12)
  • GitHub Check: sdk-compat / Node.js 24.18 (warp-ubuntu-latest-x64-4x)
  • GitHub Check: sdk-compat / Node.js 20.20 (warp-ubuntu-latest-x64-4x)
  • GitHub Check: e2e / 🧪 CLI v3 tests (warp-windows-latest-x64-4x - pnpm)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (7, 10)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (5, 10)
  • GitHub Check: sdk-compat / Node.js 22.23 (warp-ubuntu-latest-x64-4x)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (2, 10)
  • GitHub Check: sdk-compat / Node.js 26.4 (warp-ubuntu-latest-x64-4x)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (6, 10)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (3, 10)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (8, 10)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (10, 10)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (4, 10)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (9, 10)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (1, 10)
  • GitHub Check: e2e / 🧪 CLI v3 tests (warp-ubuntu-latest-x64-4x - pnpm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (warp-ubuntu-latest-x64-4x - npm)
  • GitHub Check: e2e-webapp / 🧪 E2E Tests: Webapp
  • GitHub Check: e2e / 🧪 CLI v3 tests (warp-windows-latest-x64-4x - npm)
  • GitHub Check: sdk-compat / Cloudflare Workers
  • GitHub Check: sdk-compat / Deno Runtime
  • GitHub Check: typecheck / typecheck
  • GitHub Check: sdk-compat / Bun Runtime
  • GitHub Check: packages / 🧪 Unit Tests: Packages (3, 3)
  • GitHub Check: packages / 🧪 Unit Tests: Packages (1, 3)
  • GitHub Check: packages / 🧪 Unit Tests: Packages (2, 3)
  • GitHub Check: code-quality / code-quality
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: Build and publish previews
🧰 Additional context used
📓 Path-based instructions (1)
**/package.json

📄 CodeRabbit inference engine (AGENTS.md)

When adding zod to any package, pin it to the exact repository-wide version (3.25.76) and never use a different version or range.

Files:

  • package.json
🔇 Additional comments (2)
knip.json (1)

1-4: LGTM!

package.json (1)

25-25: LGTM!

Also applies to: 64-64


Walkthrough

Added Knip configuration, a dependency-analysis npm script, and Knip as a development dependency. Removed unused dependencies and type packages from the webapp manifest, including UI, runtime, utility, authentication, identifier, and worker-related packages. Removed the SimpleSelect component module and the server-side ULID utility.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning It doesn't follow the required template and omits Closes #, checklist items, Testing, Changelog, and Screenshots. Add the template sections with Closes #, the checklist, testing steps, a changelog entry, and screenshots or note they are unavailable.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed It clearly summarizes the main change: removing unused webapp dependencies and adding a Knip check.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/remove-unused-webapp-deps

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ericallam

Copy link
Copy Markdown
Member Author

Closing in favor of folding these dependency removals into #4236, where the code that makes them unused is removed. Keeping it to one PR.

@ericallam ericallam closed this Jul 13, 2026
@ericallam ericallam deleted the chore/remove-unused-webapp-deps branch July 13, 2026 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants